## node-wow
cmake_minimum_required(VERSION 2.6)

project(node-wow)

if (WIN32)
add_definitions(-D__WINDOWS__)
add_definitions(-D_WIN32_WINNT=0x0501)
add_definitions(-D__LCC__)
add_definitions(-W3)
else()
add_definitions(-Wall)
    if (CMAKE_COMPILER_IS_GNUCXX)
        add_definitions(-std=gnu++0x)
    else ()
        add_definitions(-std=stdc++11)
    endif()
endif()

# third party libraries
set(BOOST_INC "" CACHE PATH "boost include directory")
set(BOOST_LIB "" CACHE PATH "boost library directory")
set(LIBEVENT_INC "" CACHE PATH "libevent include directory")
set(LIBEVENT_LIB "" CACHE PATH "libevent library directory")
set(MYSQL_INC "" CACHE PATH "mysql include directory")
set(MYSQL_LIB "" CACHE PATH "mysql library directory")
set(OPENSSL_INC "" CACHE PATH "openssl include directory")
set(OPENSSL_LIB "" CACHE PATH "openssl library directory")
set(TINYXML_INC "" CACHE PATH "tinyxml include directory")
set(TINYXML_LIB "" CACHE PATH "tinyxml library directory")

include_directories(
    ${BOOST_INC}
    ${LIBEVENT_INC}
    ${MYSQL_INC}
    ${OPENSSL_INC}
    ${PROJECT_SOURCE_DIR}
    ${TINYXML_INC}
)

link_directories(
    ${BOOST_LIB}
    ${LIBEVENT_LIB}
    ${MYSQL_LIB}
    ${OPENSSL_LIB}
    ${TINYXML_LIB}
)

add_subdirectory(node)
add_subdirectory(node-binding)
add_subdirectory(shared)
add_subdirectory(realmd)
add_subdirectory(game)